package com.qf.mrboot2.controller;

import com.qf.mrboot2.result.ResponseData;
import com.qf.mrboot2.service.PicService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * (Pic)表控制层
 *
 * @author makejava
 * @since 2021-05-26 16:45:38
 */
@Api(value = "picAPI")
@RestController
@RequestMapping("pic")
public class PicController {
    /**
     * 服务对象
     */
    @Autowired
    private PicService picService ;


    @ApiOperation(value = "queryByType",notes = "通过图片类型获取对应的图片列表")
    @ApiImplicitParam(name = "type",value = "图片类型",dataType = "string")
    @GetMapping("queryByType/{type}")
    public ResponseData queryByType(@PathVariable  String type){
        return picService.queryByType(type);
    }



}
